<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%-- 
    Document   : historia-clinica.jsp
    Created on : 29/09/2014, 01:47:29 AM
    Author     : Familia
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>MAS | Historia Clinica</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="Content/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>        
        <!-- font Awesome -->
        <link href="Content/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
        <!-- Ionicons -->
        <link href="Content/css/ionicons.min.css" rel="stylesheet" type="text/css"/>
        <!-- Theme style -->        
        <link href="Content/css/AdminLTE.css" rel="stylesheet" type="text/css"/>

    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <header class="header">                          
            <figure class="logo">
                <div class="user-panel">
                    <div class="pull-left image">
                        <a href="pages/dashboard.jsp">
                            <img src="Content/img/avatar3.png" class="img-circle" alt="User Image" />                            
                        </a>
                    </div>
                    <div class="pull-left info">
                        <p>Hola, Jane</p>
                        <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                    </div>
                </div>   
            </figure>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <div class="navbar-right">
                    <ul class="nav navbar-nav">
                        <!-- Messages: style can be found in dropdown.less-->
                        <li class="dropdown messages-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-envelope"></i>
                                <span class="label label-success">4</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">Tienes 4 Mensjes</li>
                            </ul>
                            <!-- Notifications: style can be found in dropdown.less -->
                        <li class="dropdown notifications-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-warning"></i>
                                <span class="label label-warning">10</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">Tienes 10 Notificaciones</li>
                            </ul>
                        </li>
                        <!-- Tasks: style can be found in dropdown.less -->
                        <li class="dropdown tasks-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-tasks"></i>
                                <span class="label label-danger">9</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">Tienes 9 tareas programadas</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu">
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Design some buttons
                                                    <small class="pull-right">20%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">20% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Create a nice theme
                                                    <small class="pull-right">40%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">40% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Some task I need to do
                                                    <small class="pull-right">60%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">60% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                    </ul>
                                </li>
                                <li class="footer">
                                    <a href="#">Ver todas las tareas</a>
                                </li>
                            </ul>
                        </li>
                        <!-- User Account: style can be found in dropdown.less -->
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="glyphicon glyphicon-user"></i>
                                <span>Jane Doe <i class="caret"></i></span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header bg-light-blue">
                                    <img src="Content/img/avatar3.png" class="img-circle" alt="User Image" />
                                    <p>
                                        Jane Doe - Médico
                                        <small>Miembro desde Nov. 2012</small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="#" class="btn btn-default btn-flat">Perfil</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="#" class="btn btn-default btn-flat">Cerrar Sesión</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- search form -->
                    <form action="#" method="get" class="sidebar-form">
                        <div class="input-group">
                            <input type="text" name="q" class="form-control" placeholder="Buscar..."/>
                            <span class="input-group-btn">
                                <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form>
                    <!-- /.search form -->
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <ul class="sidebar-menu">
                        <li class="active">
                            <a href="pages/dashboard.jsp">
                                <i class="fa fa-dashboard"></i> <span>Dashboard</span>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="glyphicon glyphicon-user"></i>
                                <span>Paciente</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li>
                                    <a href="ConsultaPaciente.do"><i class="fa fa-angle-double-right"></i> Paciente</a>
                                </li>
                                <li>
                                    <a href="ConsultarHistoriaClinica.do"><i class="fa fa-angle-double-right"></i> Historia Clinica</a>
                                </li>
                                <li>
                                    <a href="/"><i class="fa fa-angle-double-right"></i> Emergencias</a>
                                </li>
                                <li>
                                    <a href="/"><i class="fa fa-angle-double-right"></i> Signos Vitales</a>
                                </li>
                                <li>
                                    <a href="/"><i class="fa fa-angle-double-right"></i> Encuestas</a>
                                </li>
                                <li>
                                    <a href="/"><i class="fa fa-angle-double-right"></i> Sensores</a>
                                </li>
                            </ul>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-laptop"></i>
                                <span>Centro de Asistencia</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="#"><i class="fa fa-angle-double-right"></i> General</a></li>     
                            </ul>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-phone"></i> <span>Centro de Atención</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="#"><i class="fa fa-angle-double-right"></i> General Elements</a></li>                                
                            </ul>
                        </li>                        
                    </ul>
                </section>
                <!-- /.sidebar -->
            </aside>
            <aside class="right-side">
                <section class="content-header">
                    <h1>
                        Historia Clinica
                    </h1>
                    <ol class="breadcrumb">
                        <li>
                            <a href="pages/dashboard.jsp"><i class="fa fa-dashboard"></i> Inicio</a>
                        </li>
                        <li><a href="ConsultaPaciente.do">Pacientes</a></li>
                        <li class="active">Historia Clínica</li>                        
                    </ol>
                </section>                
                <section class="content">
                    <div class="tabbable">
                        <ul class="nav nav-tabs" role="tablist">
                            <li>
                                <a href="#crearHistoriaClinica" role="tab" data-toggle="tab">Crear Historia Clinica</a>
                            </li>
                            <li class="active">
                                <a href="#consultarHistoriaClinica" role="tab" data-toggle="tab">Consultar Historia clinica</a>
                            </li>
                        </ul>

                        <!-- Tab panes -->
                        <div class="tab-content">
                            <div class="tab-pane" id="crearHistoriaClinica">
                                <div class="box">
                                    <div class="box-header margin">
                                        <h3> FORMATO DE HISTORIA CLINICA <span style="color: #c7254e"> # </span> </h3>
                                    </div>
                                    <section class="content">
                                        <div class="tabbable">
                                            <ul class="nav nav-tabs" role="tablist">
                                                <li class="col-md-3 col-sm-3 col-xs-4 active">
                                                    <a href="#antecedentesPersonales" class="fondo" role="tab" data-toggle="tab"> Antecedentes Personales</a>
                                                </li>
                                                <li class="col-md-3 col-sm-3 col-xs-4">
                                                    <a href="#antecedentesFamiliares" class="fondo" role="tab" data-toggle="tab"> Antecedentes Familiares</a>
                                                </li>                                                
                                            </ul>
                                        </div>
                                        <div class="tab-content active">
                                            <div class="tab-pane active" id="antecedentesPersonales">
                                                <div class="box">
                                                    <div class="box-header margin">
                                                        <h3> PATOLOGIAS QUE SUFRE O HÁ SUFRIDO</h3>
                                                    </div>
                                                    <div class="box-body table-responsive">
                                                        <div id="example1_wrapper" class="dataTables_filter form-inline"  role="grid">


                                                            <form class="form-horizontal" role="form" method="post" action="CrearHistoriaClinica.do" onsubmit="return verificaRadios(this)">
                                                                <div class="row">
                                                                    <div class="col-md-4">   
                                                                        <div class="box-body margin">
                                                                             <input type="hidden" name="hIdHis" value="18">
                                                                            <div class="form-group text-center">
                                                                                <label class="control-label">Cancer</label>                                                            
                                                                                <input type="radio" name="cancer" id="genero" value="1" class="form-control"> Si
                                                                                <input type="radio" name="cancer" id="genero" value="2" class="form-control"> No                                                           
                                                                            </div>  
                                                                            <div class="text-center">
                                                                                <div class="form-group">
                                                                                    <input type="text" name="txtCancer" placeholder="¿Cual?" class="form-control">  
                                                                                    <input type="hidden" name="htxtCancer" value="17">
                                                                                </div>
                                                                            </div>    
                                                                            <div class="text-center">        
                                                                                <div class="form-group">
                                                                                    <label class="control-label"> Diabetes </label>                                                                                    
                                                                                    <input type="radio" name="diabetes" value="3" class="form-control" /> Si
                                                                                    <input type="radio" name="diabetes" value="4" class="form-control"/> No 
                                                                                </div>
                                                                            </div> 
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4">    
                                                                        <div class="box-body margin">
                                                                            <div class="form-group">
                                                                                <label class="control-label">Hipertensión</label>                                                                                
                                                                                <input type="radio" name="hipertencion" id="hipertencion" value="5" class="form-control"> Si
                                                                                <input type="radio" name="hipertencion" id="hipertencion" value="6" class="form-control"> No                                                                                
                                                                            </div>
                                                                            <br/> 
                                                                            <div class="form-group text-center">
                                                                                <label class="control-label">Depresión</label>                                                                                
                                                                                <input type="radio" name="depresion" id="depresion" value="7" class="form-control"> Si
                                                                                <input type="radio" name="depresion" id="depresion" value="8" class="form-control"> No                                                      
                                                                            </div>
                                                                            <br/>
                                                                            <div class="form-group text-center">
                                                                                <label class="control-label">Asma</label>                                                                                
                                                                                <input type="radio" name="asma" id="asma" value="9" class="form-control"> Si
                                                                                <input type="radio" name="asma" id="asma" value="10" class="form-control"> No                                                                               
                                                                            </div>
                                                                        </div>

                                                                    </div>
                                                                    <div class="col-md-4">    
                                                                        <div class="box-body margin">
                                                                            <div class="text-center">
                                                                                <div class="form-group">
                                                                                    <label class="control-label">Artrosis</label>                                                                                    
                                                                                    <input type="radio" name="artrosis" id="genero" value="11" class="form-control"> Si
                                                                                    <input type="radio" name="artrosis" id="genero" value="12" class="form-control"> No                                                                                    
                                                                                </div>
                                                                            </div>

                                                                            <div class="text-center">
                                                                                <div class="form-group">
                                                                                    <label class="control-label">Anorexia</label>                                                                                    
                                                                                    <input type="radio" name="anorexia" id="anorexia" value="13" class="form-control"> Si
                                                                                    <input type="radio" name="anorexia" id="anorexia" value="14" class="form-control"> No                                                                                    
                                                                                </div>
                                                                            </div>

                                                                            <div class="text-center">
                                                                                <div class="form-group">
                                                                                    <label class="control-label">Neumonia</label>                                                                                    
                                                                                    <input type="radio" name="neumonia" id="neumonia" value="15" class="form-control"> Si
                                                                                    <input type="radio" name="neumonia" id="neumonia" value="16" class="form-control"> No
                                                                                </div>
                                                                            </div>
                                                                            <div class="text-center">
                                                                                <div class="form-group">
                                                                                    <label class="control-label">Parkinson</label>                                                                                    
                                                                                    <input type="radio" name="parkinson" id="parkinson" value="17" class="form-control"> Si
                                                                                    <input type="radio" name="parkinson" id="parkinson" value="18" class="form-control"> No                                                                                    
                                                                                </div>
                                                                            </div>  
                                                                        </div>
                                                                    </div>   
                                                                </div>
                                                                <!--/row-->
                                                                <div class="row">
                                                                    <div class="col-md-6">
                                                                        <div class="col-md-12 col-ms-12 col-xs-12 paddingTop " >
                                                                            <div class="form-group">
                                                                                <label class="control-label"> Otra </label>
                                                                                <div class="input-group" > 
                                                                                    <input type="text" class="form-control">
                                                                                    <div class="input-group-addon">
                                                                                        <a href="#" onclick="AgregarCampos();"><i class="fa fa-plus-square"></i></a>
                                                                                    </div>
                                                                                </div>                              
                                                                            </div> 
                                                                            <div id="campos">
                                                                            </div>   
                                                                        </div> 
                                                                    </div>
                                                                    <div class="col-md-6">
                                                                        <div class="paddingTop">
                                                                            <div class="form-group">
                                                                                <label class=" control-label text-center"> Asignar al paciente:</label>
                                                                                <div class="col-md-8 col-ms-8 col-xs-7">
                                                                                    <select class="form-control custom required" name="selectPersona">
                                                                                        <c:forEach var="pers" items="${requestScope.personas}">
                                                                                            <option value="${pers.getIdPersona()}"> ${pers.getNumeroID()}</option>
                                                                                        </c:forEach>
                                                                                    </select>
                                                                                </div>
                                                                            </div>       
                                                                        </div>  
                                                                    </div>
                                                                </div>
                                                                <!--/row-->
                                                                <section class="content">
                                                                    <div class="row" >
                                                                        <div class="col-lg-12">
                                                                            <div class="form-group">
                                                                                <div class="col-lg-offset-4  ficha">
                                                                                    <button type="button" onclick='window.print();' class="btn btn-primary">Imprimir</button>
                                                                                    <button type="reset" class="btn btn-primary"> Borrar Campos </button>
                                                                                    <button type="submit" class="btn btn-primary"> Guardar  </button>
                                                                                </div>                                                            
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <!--/row-->   
                                                                </section>
                                                            </form>


                                                        </div>                                                        
                                                    </div>
                                                </div>
                                            </div>      
                                            <div class="tab-pane" id="antecedentesFamiliares">
                                                <div class="cuadroInterno">

                                                </div>
                                            </div>
                                        </div>
                                        <!--/Content active-->
                                    </section>  
                                </div>
                            </div>

                            <div class="tab-pane active" id="consultarHistoriaClinica">
                                <div class="box">
                                    <div class="box-header margin">
                                        <h3> HISTORIAS CLINICAS</h3>
                                    </div>
                                    <div class="box-body table-responsive">
                                        <div id="example1_wrapper" class="dataTables_filter form-inline"  role="grid">
                                            <form action="ConsultarHistoriaClinica.do" method="get" class="searchHistoriaClinica">
                                                <div class="input-group">
                                                    <input type="text" name="q" class="form-control" placeholder="Buscar..."/>
                                                    <span class="input-group-btn">
                                                        <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
                                                    </span>
                                                </div>
                                                
                                                <table id="example1" class="table table-bordered table-striped dataTable" aria-describedby="example1_info">
                                                    <thead>
                                                        <tr role="row">
                                                            <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="example1" 
                                                                rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending " 
                                                                style="width: 172px;"> ID Historia C</th><th class="sorting" role="columnheader" tabindex="0" 
                                                                                                    aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" 
                                                                                                    style="width: 250px;">Apellido Paciente</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="example1" 
                                                                                                    rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" 
                                                                                                    style="width: 230px;">Nombre Paciente</th><th class="sorting" role="columnheader" tabindex="0" 
                                                                                                 aria-controls="example1" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" 
                                                                                                 style="width: 147px;">Identificacion</th>
                                                                                                  <th class="sorting" role="columnheader" tabindex="0" 
                                                                                                 aria-controls="example1" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" 
                                                                                                 style="width: 147px;">Editar</th>
                                                        </tr>
                                                    </thead>
                                                    <tfoot>
                                                        <tr><th rowspan="1" colspan="1">ID Historia C</th>
                                                            <th rowspan="1" colspan="1">Apellido</th>
                                                            <th rowspan="1" colspan="1">Nombre</th>
                                                            <th rowspan="1" colspan="1">Identificacion</th>
                                                            <th rowspan="1" colspan="1">Editar</th>
                                                        </tr>
                                                    </tfoot>
                                                    <tbody role="alert" aria-live="polite" aria-relevant="all">
                                                        <c:forEach var="item" items="${requestScope.personas}">                                                           
                                                                <tr>
                                                                <td>
                                                                    ${item.getId_historiaClinica()}
                                                                </td> 
                                                                <td>
                                                                    ${item.getApellido2()}
                                                                </td>
                                                                <td>
                                                                    ${item.getNombre()}
                                                                </td>
                                                                <td>
                                                                    ${item.getNumeroID()}
                                                                </td>
                                                                <td>
                                                                    <a href="#"> Editar </a>
                                                                </td>
                                                            </tr> 
                                                        </c:forEach>                                                    
                                                    </tbody>
                                                </table><!--/Table-->
                                            </form> 
                                        </div>
                                    </div>
                                </div>

                            </div> 
                            <!--/tab-pane conusltar historia clinica-->
                        </div>
                        <!--/content tab-->
                </section>
            </aside>

            <!-- jQuery 2.0.2 -->
            <script src="js/ajax.googleapis.com_ajax_libs_jquery_2.0.2_jquery.min.js" type="text/javascript"></script>        
            <!-- jQuery UI 1.10.3 -->
            <script src="js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
            <!-- Bootstrap -->        
            <script src="js/bootstrap.min.js" type="text/javascript"></script>      
            <!-- AdminLTE App -->
            <script src="js/AdminLTE/app.js" type="text/javascript"></script>

            <script type="text/javascript">
                                                                                        var nextinput = 0;
                                                                                        function AgregarCampos() {
                                                                                            nextinput++;
                                                                                            campo = '<div class="form-group" id="enfermedad' + nextinput + '">\n\
                                                                    <label class="control-label text-center"> Otra:</label> \n\
                                                                    <div class="col-md-7 col-xs-7 col-sm-7">\n\
                                                                    <input class="form-control" type="text" size="20" id="campoEnfermedad' + nextinput + '"&nbsp; name="campo' + nextinput + '"&nbsp; />\n\
                                                                    </div>\n\
                                                                    </div>';
                                                                                            $("#campos").append(campo);
                                                                                        }
            </script>        

    </body>
    <footer>

    </footer>
</html>
